using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ParcelTools
{
    /// <summary>
    /// <para>Apply Parcel Least Squares Adjustment</para>
    /// <para>Applies the results of a least squares adjustment to parcel  fabric feature classes. Least squares adjustment results stored in the AdjustmentLines and AdjustmentPoints feature classes are applied to the corresponding parcel line, connection line, and parcel fabric point feature classes.</para>
    /// <para>将最小二乘法平差的结果应用于宗地结构要素类。存储在 AdjustmentLines 和 AdjustmentPoints 要素类中的最小二乘法平差结果将应用于相应的宗地线、连接线和宗地结构点要素类。</para>
    /// </summary>    
    [DisplayName("Apply Parcel Least Squares Adjustment")]
    public class ApplyParcelLeastSquaresAdjustment : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ApplyParcelLeastSquaresAdjustment()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_parcel_fabric">
        /// <para>Input Parcel Fabric</para>
        /// <para>The parcel fabric to be updated.</para>
        /// <para>要更新的宗地结构。</para>
        /// </param>
        public ApplyParcelLeastSquaresAdjustment(object _in_parcel_fabric)
        {
            this._in_parcel_fabric = _in_parcel_fabric;
        }
        public override string ToolboxName => "Parcel Tools";

        public override string ToolName => "Apply Parcel Least Squares Adjustment";

        public override string CallName => "parcel.ApplyParcelLeastSquaresAdjustment";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_parcel_fabric, _movement_tolerance, _updated_parcel_fabric, _update_attributes.GetGPValue()];

        /// <summary>
        /// <para>Input Parcel Fabric</para>
        /// <para>The parcel fabric to be updated.</para>
        /// <para>要更新的宗地结构。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Parcel Fabric")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_parcel_fabric { get; set; }


        /// <summary>
        /// <para>Movement Tolerance</para>
        /// <para>The tolerance representing the minimum allowable coordinate shift when updating parcel fabric points. If the distance between the adjustment point and the parcel fabric point is greater than the specified tolerance, the parcel fabric point is updated to the location of the adjustment point. The default tolerance is 0.05 meters.</para>
        /// <para>表示更新宗地结构点时允许的最小坐标偏移的容差。如果调整点与宗地结构点之间的距离大于指定的公差，则宗地结构点将更新为调整点的位置。默认公差为 0.05 米。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Movement Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string _movement_tolerance { get; set; } = "0.05 Meters";


        /// <summary>
        /// <para>Updated Parcel Fabric</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Parcel Fabric")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _updated_parcel_fabric { get; set; }


        /// <summary>
        /// <para>Update Attribute Fields</para>
        /// <para><xdoc>
        ///   <para>Specifies whether attribute fields in the parcel fabric Points feature class will be updated with statistical metadata. The XY Uncertainty, Error Ellipse Semi Major, Error Ellipse Semi Minor, and Error Ellipse Direction fields will be updated with the values stored in the same fields in the AdjustmentPoints feature class.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Attribute fields in the parcel fabric Points feature class will be updated with statistical metadata.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Attribute fields will not be updated. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否使用统计元数据更新宗地结构点要素类中的属性字段。XY 不确定性、误差椭圆半大略、误差椭圆半小和误差椭圆方向字段将使用存储在 AdjustmentPoints 要素类中相同字段中的值进行更新。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 宗地结构点要素类中的属性字段将使用统计元数据进行更新。</bullet_item><para/>
        ///     <bullet_item>未选中 - 属性字段将不更新。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update Attribute Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _update_attributes_value _update_attributes { get; set; } = _update_attributes_value._false;

        public enum _update_attributes_value
        {
            /// <summary>
            /// <para>UPDATE_ATTRIBUTES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("UPDATE_ATTRIBUTES")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_UPDATE_ATTRIBUTES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_UPDATE_ATTRIBUTES")]
            [GPEnumValue("false")]
            _false,

        }

        public ApplyParcelLeastSquaresAdjustment SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}